import type { GeneratedEtsLibFile } from "../../types/generated";

export const FILE: GeneratedEtsLibFile = {
  path: 'ets/api/@ohos.bluetooth.connection.d.ts',
  content: "/*\n * Copyright (C) 2023-2024 Huawei Device Co., Ltd.\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @file\n * @kit ConnectivityKit\n */\nimport type { AsyncCallback, Callback } from './@ohos.base';\nimport type constant from './@ohos.bluetooth.constant';\n/**\n * Provides methods to operate or manage Bluetooth.\n *\n * @namespace connection\n * @syscap SystemCapability.Communication.Bluetooth.Core\n * @since 10\n */\n/**\n * Provides methods to operate or manage Bluetooth.\n *\n * @namespace connection\n * @syscap SystemCapability.Communication.Bluetooth.Core\n * @atomicservice\n * @since 12\n */\n/**\n * Provides methods to operate or manage Bluetooth.\n *\n * @namespace connection\n * @syscap SystemCapability.Communication.Bluetooth.Core\n * @crossplatform\n * @atomicservice\n * @since 13\n */\ndeclare namespace connection {\n    /**\n     * Indicate the profile connection state.\n     *\n     * @typedef { constant.ProfileConnectionState } ProfileConnectionState\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @since 10\n     */\n    /**\n     * Indicate the profile connection state.\n     *\n     * @typedef { constant.ProfileConnectionState } ProfileConnectionState\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @crossplatform\n     * @since 13\n     */\n    type ProfileConnectionState = constant.ProfileConnectionState;\n    /**\n     * Indicate the profile id.\n     *\n     * @typedef { constant.ProfileId } ProfileId\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @since 10\n     */\n    /**\n     * Indicate the profile id.\n     *\n     * @typedef { constant.ProfileId } ProfileId\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @crossplatform\n     * @since 13\n     */\n    type ProfileId = constant.ProfileId;\n    \n    /**\n     * Indicate the profile uuid.\n     *\n     * @typedef { constant.ProfileUuids } ProfileUuids\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @since 12\n     */\n    /**\n     * Indicate the profile uuid.\n     *\n     * @typedef { constant.ProfileUuids } ProfileUuids\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @crossplatform\n     * @since 13\n     */\n    type ProfileUuids = constant.ProfileUuids;\n    /**\n     * Indicate the major class of a bluetooth device.\n     *\n     * @typedef { constant.MajorClass } MajorClass\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @since 10\n     */\n    /**\n     * Indicate the major class of a bluetooth device.\n     *\n     * @typedef { constant.MajorClass } MajorClass\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @crossplatform\n     * @since 13\n     */\n    type MajorClass = constant.MajorClass;\n    /**\n     * Indicate the major minor class of a bluetooth device.\n     *\n     * @typedef { constant.MajorMinorClass } MajorMinorClass\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @since 10\n     */\n    /**\n     * Indicate the major minor class of a bluetooth device.\n     *\n     * @typedef { constant.MajorMinorClass } MajorMinorClass\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @crossplatform\n     * @since 13\n     */\n    type MajorMinorClass = constant.MajorMinorClass;\n    /**\n     * Get the profile connection state of the current device.\n     *\n     * @permission ohos.permission.ACCESS_BLUETOOTH\n     * @param { ProfileId } [profileId] - Indicate the profile id. This is an optional parameter.\n     *                                  With profileId, returns the current connection state of this profile, {@link ProfileConnectionState}.\n     *                                  Without profileId, if any profile is connected, {@link ProfileConnectionState#STATE_CONNECTED} is returned.\n     *                                  Otherwise, {@link ProfileConnectionState#STATE_DISCONNECTED} is returned.\n     * @returns { ProfileConnectionState } Returns the connection state.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Incorrect parameter types.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 2900001 - Service stopped.\n     * @throws { BusinessError } 2900003 - Bluetooth disabled.\n     * @throws { BusinessError } 2900004 - Profile not supported.\n     * @throws { BusinessError } 2900099 - Operation failed.\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @since 10\n     */\n    /**\n     * Get the profile connection state of the current device.\n     *\n     * @permission ohos.permission.ACCESS_BLUETOOTH\n     * @param { ProfileId } [profileId] - Indicate the profile id. This is an optional parameter.\n     *                                  With profileId, returns the current connection state of this profile, {@link ProfileConnectionState}.\n     *                                  Without profileId, if any profile is connected, {@link ProfileConnectionState#STATE_CONNECTED} is returned.\n     *                                  Otherwise, {@link ProfileConnectionState#STATE_DISCONNECTED} is returned.\n     * @returns { ProfileConnectionState } Returns the connection state.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Incorrect parameter types.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 2900001 - Service stopped.\n     * @throws { BusinessError } 2900003 - Bluetooth disabled.\n     * @throws { BusinessError } 2900004 - Profile not supported.\n     * @throws { BusinessError } 2900099 - Operation failed.\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @crossplatform\n     * @since 13\n     */\n    function getProfileConnectionState(profileId?: ProfileId): ProfileConnectionState;\n    /**\n     * Starts pairing with a remote Bluetooth device.\n     *\n     * @permission ohos.permission.ACCESS_BLUETOOTH\n     * @param { string } deviceId - Indicates device ID. For example, \"11:22:33:AA:BB:FF\".\n     * @param { AsyncCallback<void> } callback - the callback of pairDevice.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.\n     * <br>2. Incorrect parameter types. 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 2900001 - Service stopped.\n     * @throws { BusinessError } 2900003 - Bluetooth disabled.\n     * @throws { BusinessError } 2900099 - Operation failed.\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @since 10\n     */\n    /**\n     * Starts pairing with a remote Bluetooth device.\n     *\n     * @permission ohos.permission.ACCESS_BLUETOOTH\n     * @param { string } deviceId - Indicates device ID. For example, \"11:22:33:AA:BB:FF\".\n     * @param { AsyncCallback<void> } callback - the callback of pairDevice.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.\n     * <br>2. Incorrect parameter types. 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 2900001 - Service stopped.\n     * @throws { BusinessError } 2900003 - Bluetooth disabled.\n     * @throws { BusinessError } 2900099 - Operation failed.\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @atomicservice\n     * @since 12\n     */\n    /**\n     * Starts pairing with a remote Bluetooth device.\n     *\n     * @permission ohos.permission.ACCESS_BLUETOOTH\n     * @param { string } deviceId - Indicates device ID. For example, \"11:22:33:AA:BB:FF\".\n     * @param { AsyncCallback<void> } callback - the callback of pairDevice.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.\n     * <br>2. Incorrect parameter types. 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 2900001 - Service stopped.\n     * @throws { BusinessError } 2900003 - Bluetooth disabled.\n     * @throws { BusinessError } 2900099 - Operation failed.\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @crossplatform\n     * @atomicservice\n     * @since 13\n     */\n    function pairDevice(deviceId: string, callback: AsyncCallback<void>): void;\n    /**\n     * Starts pairing with a remote Bluetooth device.\n     *\n     * @permission ohos.permission.ACCESS_BLUETOOTH\n     * @param { string } deviceId - Indicates device ID. For example, \"11:22:33:AA:BB:FF\".\n     * @returns { Promise<void> } Returns the promise object.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.\n     * <br>2. Incorrect parameter types. 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 2900001 - Service stopped.\n     * @throws { BusinessError } 2900003 - Bluetooth disabled.\n     * @throws { BusinessError } 2900099 - Operation failed.\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @since 10\n     */\n    /**\n     * Starts pairing with a remote Bluetooth device.\n     *\n     * @permission ohos.permission.ACCESS_BLUETOOTH\n     * @param { string } deviceId - Indicates device ID. For example, \"11:22:33:AA:BB:FF\".\n     * @returns { Promise<void> } Returns the promise object.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.\n     * <br>2. Incorrect parameter types. 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 2900001 - Service stopped.\n     * @throws { BusinessError } 2900003 - Bluetooth disabled.\n     * @throws { BusinessError } 2900099 - Operation failed.\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @atomicservice\n     * @since 12\n     */\n    /**\n     * Starts pairing with a remote Bluetooth device.\n     *\n     * @permission ohos.permission.ACCESS_BLUETOOTH\n     * @param { string } deviceId - Indicates device ID. For example, \"11:22:33:AA:BB:FF\".\n     * @returns { Promise<void> } Returns the promise object.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.\n     * <br>2. Incorrect parameter types. 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 2900001 - Service stopped.\n     * @throws { BusinessError } 2900003 - Bluetooth disabled.\n     * @throws { BusinessError } 2900099 - Operation failed.\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @crossplatform\n     * @atomicservice\n     * @since 13\n     */\n    function pairDevice(deviceId: string): Promise<void>;\n    /**\n     * Obtains the name of a peer Bluetooth device.\n     *\n     * @permission ohos.permission.ACCESS_BLUETOOTH\n     * @param { string } deviceId - Indicates device ID. For example, \"11:22:33:AA:BB:FF\".\n     * @returns { string } Returns the device name in character string format.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.\n     * <br>2. Incorrect parameter types. 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 2900001 - Service stopped.\n     * @throws { BusinessError } 2900003 - Bluetooth disabled.\n     * @throws { BusinessError } 2900099 - Operation failed.\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @since 10\n     */\n    /**\n     * Obtains the name of a peer Bluetooth device.\n     *\n     * @permission ohos.permission.ACCESS_BLUETOOTH\n     * @param { string } deviceId - Indicates device ID. For example, \"11:22:33:AA:BB:FF\".\n     * @returns { string } Returns the device name in character string format.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.\n     * <br>2. Incorrect parameter types. 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 2900001 - Service stopped.\n     * @throws { BusinessError } 2900003 - Bluetooth disabled.\n     * @throws { BusinessError } 2900099 - Operation failed.\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @atomicservice\n     * @since 12\n     */\n    /**\n     * Obtains the name of a peer Bluetooth device.\n     *\n     * @permission ohos.permission.ACCESS_BLUETOOTH\n     * @param { string } deviceId - Indicates device ID. For example, \"11:22:33:AA:BB:FF\".\n     * @returns { string } Returns the device name in character string format.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.\n     * <br>2. Incorrect parameter types. 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 2900001 - Service stopped.\n     * @throws { BusinessError } 2900003 - Bluetooth disabled.\n     * @throws { BusinessError } 2900099 - Operation failed.\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @crossplatform\n     * @atomicservice\n     * @since 13\n     */\n    function getRemoteDeviceName(deviceId: string): string;\n    /**\n     * Obtains the name or alias of the Bluetooth peer device.\n     *\n     * @permission ohos.permission.ACCESS_BLUETOOTH\n     * @param { string } deviceId - Indicates device ID. For example, \"11:22:33:AA:BB:FF\".\n     * @param { boolean } [alias] - Indicates whether to obtain the device alias. If the parameter is not provided, the device alias is obtained by default.\n     * @returns { string } Returns the device name in character string format.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.\n     * 2. Incorrect parameter types. 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 2900001 - Service stopped.\n     * @throws { BusinessError } 2900003 - Bluetooth disabled.\n     * @throws { BusinessError } 2900099 - Failed to obtain the name or alias of the peer Bluetooth device.\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @atomicservice\n     * @since 16\n     */\n    function getRemoteDeviceName(deviceId: string, alias?: boolean): string;\n    /**\n     * Obtains the class of a peer Bluetooth device.\n     *\n     * @permission ohos.permission.ACCESS_BLUETOOTH\n     * @param { string } deviceId - Indicates device ID. For example, \"11:22:33:AA:BB:FF\".\n     * @returns { DeviceClass } The class of the remote device.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.\n     * <br>2. Incorrect parameter types. 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 2900001 - Service stopped.\n     * @throws { BusinessError } 2900003 - Bluetooth disabled.\n     * @throws { BusinessError } 2900099 - Operation failed.\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @since 10\n     */\n    /**\n     * Obtains the class of a peer Bluetooth device.\n     *\n     * @permission ohos.permission.ACCESS_BLUETOOTH\n     * @param { string } deviceId - Indicates device ID. For example, \"11:22:33:AA:BB:FF\".\n     * @returns { DeviceClass } The class of the remote device.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.\n     * <br>2. Incorrect parameter types. 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 2900001 - Service stopped.\n     * @throws { BusinessError } 2900003 - Bluetooth disabled.\n     * @throws { BusinessError } 2900099 - Operation failed.\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @crossplatform\n     * @since 13\n     */\n    /**\n     * Obtains the class of a peer Bluetooth device.\n     *\n     * @param { string } deviceId - Indicates device ID. For example, \"11:22:33:AA:BB:FF\".\n     * @returns { DeviceClass } The class of the remote device.\n     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.\n     * <br>2. Incorrect parameter types. 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 2900001 - Service stopped.\n     * @throws { BusinessError } 2900003 - Bluetooth disabled.\n     * @throws { BusinessError } 2900099 - Operation failed.\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @crossplatform\n     * @since 18\n     */\n    function getRemoteDeviceClass(deviceId: string): DeviceClass;\n    /**\n     * Obtains the Bluetooth local name of a device.\n     *\n     * @permission ohos.permission.ACCESS_BLUETOOTH\n     * @returns { string } Returns the name the device.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 2900001 - Service stopped.\n     * @throws { BusinessError } 2900099 - Operation failed.\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @since 10\n     */\n    /**\n     * Obtains the Bluetooth local name of a device.\n     *\n     * @permission ohos.permission.ACCESS_BLUETOOTH\n     * @returns { string } Returns the name the device.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 2900001 - Service stopped.\n     * @throws { BusinessError } 2900099 - Operation failed.\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @crossplatform\n     * @since 13\n     */\n    function getLocalName(): string;\n    /**\n     * Obtains the list of Bluetooth devices that have been paired with the current device.\n     *\n     * @permission ohos.permission.ACCESS_BLUETOOTH\n     * @returns { Array<string> } Returns a list of paired Bluetooth devices's address.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 2900001 - Service stopped.\n     * @throws { BusinessError } 2900003 - Bluetooth disabled.\n     * @throws { BusinessError } 2900099 - Operation failed.\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @since 10\n     */\n    /**\n     * Obtains the list of Bluetooth devices that have been paired with the current device.\n     *\n     * @permission ohos.permission.ACCESS_BLUETOOTH\n     * @returns { Array<string> } Returns a list of paired Bluetooth devices's address.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 2900001 - Service stopped.\n     * @throws { BusinessError } 2900003 - Bluetooth disabled.\n     * @throws { BusinessError } 2900099 - Operation failed.\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @atomicservice\n     * @since 12\n     */\n    /**\n     * Obtains the list of Bluetooth devices that have been paired with the current device.\n     *\n     * @permission ohos.permission.ACCESS_BLUETOOTH\n     * @returns { Array<string> } Returns a list of paired Bluetooth devices's address.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 2900001 - Service stopped.\n     * @throws { BusinessError } 2900003 - Bluetooth disabled.\n     * @throws { BusinessError } 2900099 - Operation failed.\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @crossplatform\n     * @atomicservice\n     * @since 13\n     */\n    function getPairedDevices(): Array<string>;\n    /**\n     * Obtains the pair state of a specified device.\n     *\n     * @permission ohos.permission.ACCESS_BLUETOOTH\n     * @param { string } deviceId - Indicates device ID. For example, \"11:22:33:AA:BB:FF\".\n     * @returns { BondState } Returns the pair state.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.\n     * <br>2. Incorrect parameter types. 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 2900001 - Service stopped.\n     * @throws { BusinessError } 2900003 - Bluetooth disabled.\n     * @throws { BusinessError } 2900099 - Operation failed.\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @since 11\n     */\n    /**\n     * Obtains the pair state of a specified device.\n     *\n     * @permission ohos.permission.ACCESS_BLUETOOTH\n     * @param { string } deviceId - Indicates device ID. For example, \"11:22:33:AA:BB:FF\".\n     * @returns { BondState } Returns the pair state.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.\n     * <br>2. Incorrect parameter types. 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 2900001 - Service stopped.\n     * @throws { BusinessError } 2900003 - Bluetooth disabled.\n     * @throws { BusinessError } 2900099 - Operation failed.\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @atomicservice\n     * @since 12\n     */\n    /**\n     * Obtains the pair state of a specified device.\n     *\n     * @permission ohos.permission.ACCESS_BLUETOOTH\n     * @param { string } deviceId - Indicates device ID. For example, \"11:22:33:AA:BB:FF\".\n     * @returns { BondState } Returns the pair state.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.\n     * <br>2. Incorrect parameter types. 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 2900001 - Service stopped.\n     * @throws { BusinessError } 2900003 - Bluetooth disabled.\n     * @throws { BusinessError } 2900099 - Operation failed.\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @crossplatform\n     * @atomicservice\n     * @since 13\n     */\n    function getPairState(deviceId: string): BondState;\n    /**\n     * Sets the confirmation of pairing with a certain device.\n     *\n     * @permission ohos.permission.ACCESS_BLUETOOTH and ohos.permission.MANAGE_BLUETOOTH\n     * @param { string } deviceId - Indicates device ID. For example, \"11:22:33:AA:BB:FF\".\n     * @param { boolean } accept - Indicates whether to accept the pairing request, {@code true} indicates accept or {@code false} otherwise.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.\n     * <br>2. Incorrect parameter types. 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 2900001 - Service stopped.\n     * @throws { BusinessError } 2900003 - Bluetooth disabled.\n     * @throws { BusinessError } 2900099 - Operation failed.\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @since 10\n     */\n    function setDevicePairingConfirmation(deviceId: string, accept: boolean): void;\n    /**\n     * Set the pin during pairing when the pin type is PIN_TYPE_ENTER_PIN_CODE.\n     *\n     * @permission ohos.permission.ACCESS_BLUETOOTH\n     * @param { string } deviceId - Indicates device ID. For example, \"11:22:33:AA:BB:FF\".\n     * @param { string } code - The pin code entered by the user.\n     * @param { AsyncCallback<void> } callback - the callback of setDevicePinCode.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.\n     * <br>2. Incorrect parameter types. 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 2900001 - Service stopped.\n     * @throws { BusinessError } 2900003 - Bluetooth disabled.\n     * @throws { BusinessError } 2900099 - Operation failed.\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @since 10\n     */\n    function setDevicePinCode(deviceId: string, code: string, callback: AsyncCallback<void>): void;\n    /**\n     * Set the pin during pairing when the pin type is PIN_TYPE_ENTER_PIN_CODE.\n     *\n     * @permission ohos.permission.ACCESS_BLUETOOTH\n     * @param { string } deviceId - Indicates device ID. For example, \"11:22:33:AA:BB:FF\".\n     * @param { string } code - The pin code entered by the user.\n     * @returns { Promise<void> } Returns the promise object.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.\n     * <br>2. Incorrect parameter types. 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 2900001 - Service stopped.\n     * @throws { BusinessError } 2900003 - Bluetooth disabled.\n     * @throws { BusinessError } 2900099 - Operation failed.\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @since 10\n     */\n    function setDevicePinCode(deviceId: string, code: string): Promise<void>;\n    /**\n     * Sets the Bluetooth friendly name of a device. It is used only by system applications for security.\n     * If a non-system application invokes the interface, exception 801 is thrown.\n     *\n     * @permission ohos.permission.ACCESS_BLUETOOTH\n     * @param { string } name - Indicates a valid Bluetooth name.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.\n     * <br>2. Incorrect parameter types. 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 2900001 - Service stopped.\n     * @throws { BusinessError } 2900003 - Bluetooth disabled.\n     * @throws { BusinessError } 2900099 - Operation failed.\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @since 10\n     * @deprecated since 12\n     */\n    function setLocalName(name: string): void;\n    /**\n     * Sets the Bluetooth scan mode for a device.\n     *\n     * @permission ohos.permission.ACCESS_BLUETOOTH\n     * @param { ScanMode } mode - Indicates the Bluetooth scan mode to set.\n     * @param { number } duration - Indicates the duration in seconds, in which the host is discoverable.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.\n     * <br>2. Incorrect parameter types. 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 2900001 - Service stopped.\n     * @throws { BusinessError } 2900003 - Bluetooth disabled.\n     * @throws { BusinessError } 2900099 - Operation failed.\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @since 10\n     */\n    function setBluetoothScanMode(mode: ScanMode, duration: number): void;\n    /**\n     * Obtains the Bluetooth scanning mode of a device.\n     *\n     * @permission ohos.permission.ACCESS_BLUETOOTH\n     * @returns { ScanMode } Returns the Bluetooth scanning mode.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 2900001 - Service stopped.\n     * @throws { BusinessError } 2900003 - Bluetooth disabled.\n     * @throws { BusinessError } 2900099 - Operation failed.\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @since 10\n     */\n    /**\n     * Obtains the Bluetooth scanning mode of a device.\n     *\n     * @permission ohos.permission.ACCESS_BLUETOOTH\n     * @returns { ScanMode } Returns the Bluetooth scanning mode.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 2900001 - Service stopped.\n     * @throws { BusinessError } 2900003 - Bluetooth disabled.\n     * @throws { BusinessError } 2900099 - Operation failed.\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @crossplatform\n     * @since 13\n     */\n    function getBluetoothScanMode(): ScanMode;\n    /**\n     * Starts scanning Bluetooth devices.\n     *\n     * @permission ohos.permission.ACCESS_BLUETOOTH\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 2900001 - Service stopped.\n     * @throws { BusinessError } 2900003 - Bluetooth disabled.\n     * @throws { BusinessError } 2900099 - Operation failed.\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @since 10\n     */\n    /**\n     * Starts scanning Bluetooth devices.\n     *\n     * @permission ohos.permission.ACCESS_BLUETOOTH\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 2900001 - Service stopped.\n     * @throws { BusinessError } 2900003 - Bluetooth disabled.\n     * @throws { BusinessError } 2900099 - Operation failed.\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @atomicservice\n     * @since 12\n     */\n    /**\n     * Starts scanning Bluetooth devices.\n     *\n     * @permission ohos.permission.ACCESS_BLUETOOTH\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 2900001 - Service stopped.\n     * @throws { BusinessError } 2900003 - Bluetooth disabled.\n     * @throws { BusinessError } 2900099 - Operation failed.\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @crossplatform\n     * @atomicservice\n     * @since 13\n     */\n    function startBluetoothDiscovery(): void;\n    /**\n     * Stops Bluetooth device scanning.\n     *\n     * @permission ohos.permission.ACCESS_BLUETOOTH\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 2900001 - Service stopped.\n     * @throws { BusinessError } 2900003 - Bluetooth disabled.\n     * @throws { BusinessError } 2900099 - Operation failed.\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @since 10\n     */\n    /**\n     * Stops Bluetooth device scanning.\n     *\n     * @permission ohos.permission.ACCESS_BLUETOOTH\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 2900001 - Service stopped.\n     * @throws { BusinessError } 2900003 - Bluetooth disabled.\n     * @throws { BusinessError } 2900099 - Operation failed.\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @atomicservice\n     * @since 12\n     */\n    /**\n     * Stops Bluetooth device scanning.\n     *\n     * @permission ohos.permission.ACCESS_BLUETOOTH\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 2900001 - Service stopped.\n     * @throws { BusinessError } 2900003 - Bluetooth disabled.\n     * @throws { BusinessError } 2900099 - Operation failed.\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @crossplatform\n     * @atomicservice\n     * @since 13\n     */\n    function stopBluetoothDiscovery(): void;\n    /**\n     * Check if bluetooth is discovering.\n     *\n     * @permission ohos.permission.ACCESS_BLUETOOTH\n     * @returns { boolean } Returns {@code true} if the local device is discovering; returns {@code false} otherwise.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 2900001 - Service stopped.\n     * @throws { BusinessError } 2900003 - Bluetooth disabled.\n     * @throws { BusinessError } 2900099 - Operation failed.\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @since 11\n     */\n    /**\n     * Check if bluetooth is discovering.\n     *\n     * @permission ohos.permission.ACCESS_BLUETOOTH\n     * @returns { boolean } Returns {@code true} if the local device is discovering; returns {@code false} otherwise.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 2900001 - Service stopped.\n     * @throws { BusinessError } 2900003 - Bluetooth disabled.\n     * @throws { BusinessError } 2900099 - Operation failed.\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @crossplatform\n     * @since 13\n     */\n    function isBluetoothDiscovering(): boolean;\n    \n    /**\n     * Obtains the profile UUIDs supported by the remote device.\n     *\n     * @permission ohos.permission.ACCESS_BLUETOOTH\n     * @param { string } deviceId - Indicates device ID. For example, \"11:22:33:AA:BB:FF\".\n     * @param { AsyncCallback<Array<ProfileUuids>> } callback - the callback of getRemoteProfileUuids.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Invalid parameter.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 2900001 - Service stopped.\n     * @throws { BusinessError } 2900003 - Bluetooth disabled.\n     * @throws { BusinessError } 2900099 - Operation failed.\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @since 12\n     */\n    /**\n     * Obtains the profile UUIDs supported by the remote device.\n     *\n     * @permission ohos.permission.ACCESS_BLUETOOTH\n     * @param { string } deviceId - Indicates device ID. For example, \"11:22:33:AA:BB:FF\".\n     * @param { AsyncCallback<Array<ProfileUuids>> } callback - the callback of getRemoteProfileUuids.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Invalid parameter.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 2900001 - Service stopped.\n     * @throws { BusinessError } 2900003 - Bluetooth disabled.\n     * @throws { BusinessError } 2900099 - Operation failed.\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @crossplatform\n     * @since 13\n     */\n    function getRemoteProfileUuids(deviceId: string, callback: AsyncCallback<Array<ProfileUuids>>): void;\n    \n    /**\n     * Obtains the profile UUIDs supported by the remote device.\n     *\n     * @permission ohos.permission.ACCESS_BLUETOOTH\n     * @param { string } deviceId - Indicates device ID. For example, \"11:22:33:AA:BB:FF\".\n     * @returns { Promise<Array<ProfileUuids>> } Returns the promise object.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Invalid parameter.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 2900001 - Service stopped.\n     * @throws { BusinessError } 2900003 - Bluetooth disabled.\n     * @throws { BusinessError } 2900099 - Operation failed.\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @since 12\n     */\n    /**\n     * Obtains the profile UUIDs supported by the remote device.\n     *\n     * @permission ohos.permission.ACCESS_BLUETOOTH\n     * @param { string } deviceId - Indicates device ID. For example, \"11:22:33:AA:BB:FF\".\n     * @returns { Promise<Array<ProfileUuids>> } Returns the promise object.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Invalid parameter.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 2900001 - Service stopped.\n     * @throws { BusinessError } 2900003 - Bluetooth disabled.\n     * @throws { BusinessError } 2900099 - Operation failed.\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @crossplatform\n     * @since 13\n     */\n    function getRemoteProfileUuids(deviceId: string): Promise<Array<ProfileUuids>>;\n    \n    /**\n     * Connects all allowed bluetooth profiles between the local and remote device.\n     *\n     * @permission ohos.permission.ACCESS_BLUETOOTH\n     * @param { string } deviceId - Indicates device ID. For example, \"11:22:33:AA:BB:FF\".\n     * @param { AsyncCallback<void> } callback - the callback result.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.\n     * 2. Incorrect parameter types. 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 2900001 - Service stopped.\n     * @throws { BusinessError } 2900003 - Bluetooth disabled.\n     * @throws { BusinessError } 2900099 - Operation failed.\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @since 16\n     */\n    function connectAllowedProfiles(deviceId: string, callback: AsyncCallback<void>): void;\n    \n    /**\n     * Connects all allowed bluetooth profiles between the local and remote device.\n     *\n     * @permission ohos.permission.ACCESS_BLUETOOTH\n     * @param { string } deviceId - Indicates device ID. For example, \"11:22:33:AA:BB:FF\".\n     * @returns { Promise<void> } Returns the promise object.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.\n     * 2. Incorrect parameter types. 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 2900001 - Service stopped.\n     * @throws { BusinessError } 2900003 - Bluetooth disabled.\n     * @throws { BusinessError } 2900099 - Operation failed.\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @since 16\n     */\n    function connectAllowedProfiles(deviceId: string): Promise<void>;\n    /**\n     * Get remote device battery information.\n     *\n     * @permission ohos.permission.ACCESS_BLUETOOTH\n     * @param { string } deviceId - Indicates device ID. For example, \"11:22:33:AA:BB:FF\".\n     * @returns { Promise<BatteryInfo> } Returns battery info.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.\n     * <br>2. Incorrect parameter types. 3. Parameter verification failed.\n     * @throws { BusinessError } 2900001 - Service stopped.\n     * @throws { BusinessError } 2900003 - Bluetooth disabled.\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @since 12\n     */\n    function getRemoteDeviceBatteryInfo(deviceId: string): Promise<BatteryInfo>;\n    /**\n     * Modify remote device name.\n     *\n     * @permission ohos.permission.ACCESS_BLUETOOTH\n     * @param { string } deviceId - Indicates device ID. For example, \"11:22:33:AA:BB:FF\".\n     * @param { string } name - New device name. Max length is 64 bytes.\n     * @returns { Promise<void> } Returns the promise object.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.\n     * <br>2. Incorrect parameter types. 3. Parameter verification failed.\n     * @throws { BusinessError } 2900001 - Service stopped.\n     * @throws { BusinessError } 2900003 - Bluetooth disabled.\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @atomicservice\n     * @since 12\n     */\n    function setRemoteDeviceName(deviceId: string, name: string): Promise<void>;\n    /**\n     * Get latest connection time of device.\n     *\n     * @param { string } deviceId - Indicates device ID. For example, \"11:22:33:AA:BB:FF\".\n     * @returns { Promise<number> } Returns latest connection time.\n     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.\n     * <br>2. Incorrect parameter types. 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 2900001 - Service stopped.\n     * @throws { BusinessError } 2900003 - Bluetooth disabled.\n     * @throws { BusinessError } 2900099 - Operation failed.\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @since 15\n     */\n    function getLastConnectionTime(deviceId: string): Promise<number>;\n    /**\n     * Subscribe the event reported when a remote Bluetooth device is discovered.\n     *\n     * @permission ohos.permission.ACCESS_BLUETOOTH\n     * @param { 'bluetoothDeviceFind' } type - Type of the discovering event to listen for.\n     * @param { Callback<Array<string>> } callback - Callback used to listen for the discovering event.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.\n     * <br>2. Incorrect parameter types. 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 2900099 - Operation failed.\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @since 10\n     */\n    /**\n     * Subscribe the event reported when a remote Bluetooth device is discovered.\n     *\n     * @permission ohos.permission.ACCESS_BLUETOOTH\n     * @param { 'bluetoothDeviceFind' } type - Type of the discovering event to listen for.\n     * @param { Callback<Array<string>> } callback - Callback used to listen for the discovering event.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.\n     * <br>2. Incorrect parameter types. 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 2900099 - Operation failed.\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @atomicservice\n     * @since 12\n     */\n    /**\n     * Subscribe the event reported when a remote Bluetooth device is discovered.\n     *\n     * @permission ohos.permission.ACCESS_BLUETOOTH\n     * @param { 'bluetoothDeviceFind' } type - Type of the discovering event to listen for.\n     * @param { Callback<Array<string>> } callback - Callback used to listen for the discovering event.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.\n     * <br>2. Incorrect parameter types. 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 2900099 - Operation failed.\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @crossplatform\n     * @atomicservice\n     * @since 13\n     */\n    function on(type: 'bluetoothDeviceFind', callback: Callback<Array<string>>): void;\n    /**\n     * Unsubscribe the event reported when a remote Bluetooth device is discovered.\n     *\n     * @permission ohos.permission.ACCESS_BLUETOOTH\n     * @param { 'bluetoothDeviceFind' } type - Type of the discovering event to listen for.\n     * @param { Callback<Array<string>> } callback - Callback used to listen for the discovering event.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 2900099 - Operation failed.\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @since 10\n     */\n    /**\n     * Unsubscribe the event reported when a remote Bluetooth device is discovered.\n     *\n     * @permission ohos.permission.ACCESS_BLUETOOTH\n     * @param { 'bluetoothDeviceFind' } type - Type of the discovering event to listen for.\n     * @param { Callback<Array<string>> } callback - Callback used to listen for the discovering event.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 2900099 - Operation failed.\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @atomicservice\n     * @since 12\n     */\n    /**\n     * Unsubscribe the event reported when a remote Bluetooth device is discovered.\n     *\n     * @permission ohos.permission.ACCESS_BLUETOOTH\n     * @param { 'bluetoothDeviceFind' } type - Type of the discovering event to listen for.\n     * @param { Callback<Array<string>> } callback - Callback used to listen for the discovering event.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 2900099 - Operation failed.\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @crossplatform\n     * @atomicservice\n     * @since 13\n     */\n    function off(type: 'bluetoothDeviceFind', callback?: Callback<Array<string>>): void;\n    \n    /**\n     * Subscribe the event reported when a remote Bluetooth device is discovered.\n     *\n     * @permission ohos.permission.ACCESS_BLUETOOTH\n     * @param { 'discoveryResult' } type - Type of the discovering event to listen for.\n     * @param { Callback<Array<DiscoveryResult>> } callback - Callback used to listen for the discovering event.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.\n     * <br>2. Incorrect parameter types. 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 2900099 - Operation failed.\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @since 18\n     */\n    function on(type: 'discoveryResult', callback: Callback<Array<DiscoveryResult>>): void;\n    \n    /**\n     * Unsubscribe the event reported when a remote Bluetooth device is discovered.\n     *\n     * @permission ohos.permission.ACCESS_BLUETOOTH\n     * @param { 'discoveryResult' } type - Type of the discovering event to listen for.\n     * @param { Callback<Array<DiscoveryResult>> } callback - Callback used to listen for the discovering event.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 2900099 - Operation failed.\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @since 18\n     */\n    function off(type: 'discoveryResult', callback?: Callback<Array<DiscoveryResult>>): void;\n    /**\n     * Subscribe the event reported when a remote Bluetooth device is bonded.\n     *\n     * @permission ohos.permission.ACCESS_BLUETOOTH\n     * @param { 'bondStateChange' } type - Type of the bond state event to listen for.\n     * @param { Callback<BondStateParam> } callback - Callback used to listen for the bond state event.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.\n     * <br>2. Incorrect parameter types. 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 2900099 - Operation failed.\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @since 10\n     */\n    /**\n     * Subscribe the event reported when a remote Bluetooth device is bonded.\n     *\n     * @permission ohos.permission.ACCESS_BLUETOOTH\n     * @param { 'bondStateChange' } type - Type of the bond state event to listen for.\n     * @param { Callback<BondStateParam> } callback - Callback used to listen for the bond state event.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.\n     * <br>2. Incorrect parameter types. 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 2900099 - Operation failed.\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @crossplatform\n     * @since 13\n     */\n    function on(type: 'bondStateChange', callback: Callback<BondStateParam>): void;\n    /**\n     * Unsubscribe the event reported when a remote Bluetooth device is bonded.\n     *\n     * @permission ohos.permission.ACCESS_BLUETOOTH\n     * @param { 'bondStateChange' } type - Type of the bond state event to listen for.\n     * @param { Callback<BondStateParam> } callback - Callback used to listen for the bond state event.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.\n     * <br>2. Incorrect parameter types. 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 2900099 - Operation failed.\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @since 10\n     */\n    /**\n     * Unsubscribe the event reported when a remote Bluetooth device is bonded.\n     *\n     * @permission ohos.permission.ACCESS_BLUETOOTH\n     * @param { 'bondStateChange' } type - Type of the bond state event to listen for.\n     * @param { Callback<BondStateParam> } callback - Callback used to listen for the bond state event.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.\n     * <br>2. Incorrect parameter types. 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 2900099 - Operation failed.\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @crossplatform\n     * @since 13\n     */\n    function off(type: 'bondStateChange', callback?: Callback<BondStateParam>): void;\n    /**\n     * Subscribe the event of a pairing request from a remote Bluetooth device.\n     *\n     * @permission ohos.permission.ACCESS_BLUETOOTH\n     * @param { 'pinRequired' } type - Type of the pairing request event to listen for.\n     * @param { Callback<PinRequiredParam> } callback - Callback used to listen for the pairing request event.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.\n     * <br>2. Incorrect parameter types. 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 2900099 - Operation failed.\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @since 10\n     */\n    function on(type: 'pinRequired', callback: Callback<PinRequiredParam>): void;\n    /**\n     * Unsubscribe the event of a pairing request from a remote Bluetooth device.\n     *\n     * @permission ohos.permission.ACCESS_BLUETOOTH\n     * @param { 'pinRequired' } type - Type of the pairing request event to listen for.\n     * @param { Callback<PinRequiredParam> } callback - Callback used to listen for the pairing request event.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified.\n     * <br>2. Incorrect parameter types. 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - Capability not supported.\n     * @throws { BusinessError } 2900099 - Operation failed.\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @since 10\n     */\n    function off(type: 'pinRequired', callback?: Callback<PinRequiredParam>): void;\n    /**\n     * Subscribe the event of battery state changed from a remote device.\n     *\n     * @permission ohos.permission.ACCESS_BLUETOOTH\n     * @param { 'batteryChange' } type - Type of the battery event to listen for.\n     * @param { Callback<BatteryInfo> } callback - Callback used to listen.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 2900099 - Operation failed.\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @since 12\n     */\n    function on(type: 'batteryChange', callback: Callback<BatteryInfo>): void;\n    /**\n     * Unsubscribe the event of battery state changed from a remote device.\n     *\n     * @permission ohos.permission.ACCESS_BLUETOOTH\n     * @param { 'batteryChange' } type - Type of the battery event to listen for.\n     * @param { Callback<BatteryInfo> } callback - Callback used to listen.\n     * @throws { BusinessError } 201 - Permission denied.\n     * @throws { BusinessError } 2900099 - Operation failed.\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @since 12\n     */\n    function off(type: 'batteryChange', callback?: Callback<BatteryInfo>): void;\n    /**\n     * Describes the class of a bluetooth device.\n     *\n     * @typedef BondStateParam\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @since 10\n     */\n    /**\n     * Describes the class of a bluetooth device.\n     *\n     * @typedef BondStateParam\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @crossplatform\n     * @since 13\n     */\n    interface BondStateParam {\n        /**\n         * Address of a Bluetooth device.\n         *\n         * @type { string }\n         * @syscap SystemCapability.Communication.Bluetooth.Core\n         * @since 10\n         */\n        /**\n         * Address of a Bluetooth device.\n         *\n         * @type { string }\n         * @syscap SystemCapability.Communication.Bluetooth.Core\n         * @crossplatform\n         * @since 13\n         */\n        deviceId: string;\n        /**\n         * Profile connection state of the device.\n         *\n         * @type { BondState }\n         * @syscap SystemCapability.Communication.Bluetooth.Core\n         * @since 10\n         */\n        /**\n         * Profile connection state of the device.\n         *\n         * @type { BondState }\n         * @syscap SystemCapability.Communication.Bluetooth.Core\n         * @crossplatform\n         * @since 13\n         */\n        state: BondState;\n        /**\n         * Cause of unbond.\n         *\n         * @type { UnbondCause }\n         * @syscap SystemCapability.Communication.Bluetooth.Core\n         * @since 12\n         */\n        /**\n         * Cause of unbond.\n         *\n         * @type { UnbondCause }\n         * @syscap SystemCapability.Communication.Bluetooth.Core\n         * @crossplatform\n         * @since 13\n         */\n        cause: UnbondCause;\n    }\n    /**\n     * Describes the bond key param.\n     *\n     * @typedef PinRequiredParam\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @since 10\n     */\n    interface PinRequiredParam {\n        /**\n         * ID of the device to pair.\n         *\n         * @type { string }\n         * @syscap SystemCapability.Communication.Bluetooth.Core\n         * @since 10\n         */\n        deviceId: string;\n        /**\n         * Key for the device pairing.\n         *\n         * @type { string }\n         * @syscap SystemCapability.Communication.Bluetooth.Core\n         * @since 10\n         */\n        pinCode: string;\n    }\n    /**\n     * Describes the class of a bluetooth device.\n     *\n     * @typedef DeviceClass\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @since 10\n     */\n    /**\n     * Describes the class of a bluetooth device.\n     *\n     * @typedef DeviceClass\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @crossplatform\n     * @since 13\n     */\n    interface DeviceClass {\n        /**\n         * Major classes of Bluetooth devices.\n         *\n         * @type { MajorClass }\n         * @syscap SystemCapability.Communication.Bluetooth.Core\n         * @since 10\n         */\n        /**\n         * Major classes of Bluetooth devices.\n         *\n         * @type { MajorClass }\n         * @syscap SystemCapability.Communication.Bluetooth.Core\n         * @crossplatform\n         * @since 13\n         */\n        majorClass: MajorClass;\n        /**\n         * Major and minor classes of Bluetooth devices.\n         *\n         * @type { MajorMinorClass }\n         * @syscap SystemCapability.Communication.Bluetooth.Core\n         * @since 10\n         */\n        /**\n         * Major and minor classes of Bluetooth devices.\n         *\n         * @type { MajorMinorClass }\n         * @syscap SystemCapability.Communication.Bluetooth.Core\n         * @crossplatform\n         * @since 13\n         */\n        majorMinorClass: MajorMinorClass;\n        /**\n         * Class of the device.\n         *\n         * @type { number }\n         * @syscap SystemCapability.Communication.Bluetooth.Core\n         * @since 10\n         */\n        /**\n         * Class of the device.\n         *\n         * @type { number }\n         * @syscap SystemCapability.Communication.Bluetooth.Core\n         * @crossplatform\n         * @since 13\n         */\n        classOfDevice: number;\n    }\n    /**\n     * Enum for the transport of a remote device\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @since 10\n     */\n    enum BluetoothTransport {\n        /**\n         * The value of bluetooth transport BR/EDR.\n         *\n         * @syscap SystemCapability.Communication.Bluetooth.Core\n         * @since 10\n         */\n        TRANSPORT_BR_EDR = 0,\n        /**\n         * The value of bluetooth transport LE.\n         *\n         * @syscap SystemCapability.Communication.Bluetooth.Core\n         * @since 10\n         */\n        TRANSPORT_LE = 1\n    }\n    /**\n     * The enum of BR scan mode.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @since 10\n     */\n    /**\n     * The enum of BR scan mode.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @crossplatform\n     * @since 13\n     */\n    enum ScanMode {\n        /**\n         * Indicates the scan mode is none\n         *\n         * @syscap SystemCapability.Communication.Bluetooth.Core\n         * @since 10\n         */\n        /**\n         * Indicates the scan mode is none\n         *\n         * @syscap SystemCapability.Communication.Bluetooth.Core\n         * @crossplatform\n         * @since 13\n         */\n        SCAN_MODE_NONE = 0,\n        /**\n         * Indicates the scan mode is connectable\n         *\n         * @syscap SystemCapability.Communication.Bluetooth.Core\n         * @since 10\n         */\n        /**\n         * Indicates the scan mode is connectable\n         *\n         * @syscap SystemCapability.Communication.Bluetooth.Core\n         * @crossplatform\n         * @since 13\n         */\n        SCAN_MODE_CONNECTABLE = 1,\n        /**\n         * Indicates the scan mode is general discoverable\n         *\n         * @syscap SystemCapability.Communication.Bluetooth.Core\n         * @since 10\n         */\n        SCAN_MODE_GENERAL_DISCOVERABLE = 2,\n        /**\n         * Indicates the scan mode is limited discoverable\n         *\n         * @syscap SystemCapability.Communication.Bluetooth.Core\n         * @since 10\n         */\n        SCAN_MODE_LIMITED_DISCOVERABLE = 3,\n        /**\n         * Indicates the scan mode is connectable and general discoverable\n         *\n         * @syscap SystemCapability.Communication.Bluetooth.Core\n         * @since 10\n         */\n        /**\n         * Indicates the scan mode is connectable and general discoverable\n         *\n         * @syscap SystemCapability.Communication.Bluetooth.Core\n         * @crossplatform\n         * @since 13\n         */\n        SCAN_MODE_CONNECTABLE_GENERAL_DISCOVERABLE = 4,\n        /**\n         * Indicates the scan mode is connectable and limited discoverable\n         *\n         * @syscap SystemCapability.Communication.Bluetooth.Core\n         * @since 10\n         */\n        SCAN_MODE_CONNECTABLE_LIMITED_DISCOVERABLE = 5\n    }\n    /**\n     * The enum of bond state.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @since 10\n     */\n    /**\n     * The enum of bond state.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @atomicservice\n     * @since 12\n     */\n    /**\n     * The enum of bond state.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @crossplatform\n     * @atomicservice\n     * @since 13\n     */\n    enum BondState {\n        /**\n         * Indicate the bond state is invalid\n         *\n         * @syscap SystemCapability.Communication.Bluetooth.Core\n         * @since 10\n         */\n        /**\n         * Indicate the bond state is invalid\n         *\n         * @syscap SystemCapability.Communication.Bluetooth.Core\n         * @atomicservice\n         * @since 12\n         */\n        /**\n         * Indicate the bond state is invalid\n         *\n         * @syscap SystemCapability.Communication.Bluetooth.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 13\n         */\n        BOND_STATE_INVALID = 0,\n        /**\n         * Indicate the bond state is bonding\n         *\n         * @syscap SystemCapability.Communication.Bluetooth.Core\n         * @since 10\n         */\n        /**\n         * Indicate the bond state is bonding\n         *\n         * @syscap SystemCapability.Communication.Bluetooth.Core\n         * @atomicservice\n         * @since 12\n         */\n        /**\n         * Indicate the bond state is bonding\n         *\n         * @syscap SystemCapability.Communication.Bluetooth.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 13\n         */\n        BOND_STATE_BONDING = 1,\n        /**\n         * Indicate the bond state is bonded\n         *\n         * @syscap SystemCapability.Communication.Bluetooth.Core\n         * @since 10\n         */\n        /**\n         * Indicate the bond state is bonded\n         *\n         * @syscap SystemCapability.Communication.Bluetooth.Core\n         * @atomicservice\n         * @since 12\n         */\n        /**\n         * Indicate the bond state is bonded\n         *\n         * @syscap SystemCapability.Communication.Bluetooth.Core\n         * @crossplatform\n         * @atomicservice\n         * @since 13\n         */\n        BOND_STATE_BONDED = 2\n    }\n    \n    /**\n     * Describes the contents of the discovery results\n     *\n     * @typedef DiscoveryResult\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @since 18\n     */\n    interface DiscoveryResult {\n        \n        /**\n         * Identify of the discovery device\n         *\n         * @type { string }\n         * @syscap SystemCapability.Communication.Bluetooth.Core\n         * @since 18\n         */\n        deviceId: string;\n        \n        /**\n         * RSSI of the remote device\n         *\n         * @type { number }\n         * @syscap SystemCapability.Communication.Bluetooth.Core\n         * @since 18\n         */\n        rssi: number;\n        \n        /**\n         * The local name of the device\n         *\n         * @type { string }\n         * @syscap SystemCapability.Communication.Bluetooth.Core\n         * @since 18\n         */\n        deviceName: string;\n        \n        /**\n         * The class of the device\n         *\n         * @type { DeviceClass }\n         * @syscap SystemCapability.Communication.Bluetooth.Core\n         * @since 18\n         */\n        deviceClass: DeviceClass;\n    }\n    /**\n     * Describes the contents of the battery information.\n     *\n     * @typedef BatteryInfo\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @since 12\n     */\n    interface BatteryInfo {\n        /**\n         * Electricity value of the general device. {@code -1} means no power information.\n         *\n         * @type { number }\n         * @syscap SystemCapability.Communication.Bluetooth.Core\n         * @since 12\n         */\n        batteryLevel: number;\n        /**\n         * Electricity value of the left ear. {@code -1} means no power information.\n         *\n         * @type { number }\n         * @syscap SystemCapability.Communication.Bluetooth.Core\n         * @since 12\n         */\n        leftEarBatteryLevel: number;\n        /**\n         * The charge state of the left ear.\n         *\n         * @type { DeviceChargeState }\n         * @syscap SystemCapability.Communication.Bluetooth.Core\n         * @since 12\n         */\n        leftEarChargeState: DeviceChargeState;\n        /**\n         * Electricity value of the right ear. {@code -1} means no power information.\n         *\n         * @type { number }\n         * @syscap SystemCapability.Communication.Bluetooth.Core\n         * @since 12\n         */\n        rightEarBatteryLevel: number;\n        /**\n         * The charge state of the right ear.\n         *\n         * @type { DeviceChargeState }\n         * @syscap SystemCapability.Communication.Bluetooth.Core\n         * @since 12\n         */\n        rightEarChargeState: DeviceChargeState;\n        /**\n         * Electricity value of the box. {@code -1} means no power information.\n         *\n         * @type { number }\n         * @syscap SystemCapability.Communication.Bluetooth.Core\n         * @since 12\n         */\n        boxBatteryLevel: number;\n        /**\n         * The charge state of the box.\n         *\n         * @type { DeviceChargeState }\n         * @syscap SystemCapability.Communication.Bluetooth.Core\n         * @since 12\n         */\n        boxChargeState: DeviceChargeState;\n    }\n    /**\n     * Enum for the charge state.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @since 12\n     */\n    enum DeviceChargeState {\n        /**\n         * Not support super charge, and not charged.\n         *\n         * @syscap SystemCapability.Communication.Bluetooth.Core\n         * @since 12\n         */\n        DEVICE_NORMAL_CHARGE_NOT_CHARGED = 0,\n        /**\n         * Not support super charge, and in charging.\n         *\n         * @syscap SystemCapability.Communication.Bluetooth.Core\n         * @since 12\n         */\n        DEVICE_NORMAL_CHARGE_IN_CHARGING = 1,\n        /**\n         * Support super charge, and not charged.\n         *\n         * @syscap SystemCapability.Communication.Bluetooth.Core\n         * @since 12\n         */\n        DEVICE_SUPER_CHARGE_NOT_CHARGED = 2,\n        /**\n         * Support super charge, and in charging.\n         *\n         * @syscap SystemCapability.Communication.Bluetooth.Core\n         * @since 12\n         */\n        DEVICE_SUPER_CHARGE_IN_CHARGING = 3\n    }\n    /**\n     * Enum for cause of unbond.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @since 12\n     */\n    /**\n     * Enum for cause of unbond.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Communication.Bluetooth.Core\n     * @crossplatform\n     * @since 13\n     */\n    enum UnbondCause {\n        /**\n         * User proactively removed device.\n         *\n         * @syscap SystemCapability.Communication.Bluetooth.Core\n         * @since 12\n         */\n        /**\n         * User proactively removed device.\n         *\n         * @syscap SystemCapability.Communication.Bluetooth.Core\n         * @crossplatform\n         * @since 13\n         */\n        USER_REMOVED = 0,\n        /**\n         * Remote device shut down.\n         *\n         * @syscap SystemCapability.Communication.Bluetooth.Core\n         * @since 12\n         */\n        REMOTE_DEVICE_DOWN = 1,\n        /**\n         * Wrong PIN code.\n         *\n         * @syscap SystemCapability.Communication.Bluetooth.Core\n         * @since 12\n         */\n        AUTH_FAILURE = 2,\n        /**\n         * Remote device rejected.\n         *\n         * @syscap SystemCapability.Communication.Bluetooth.Core\n         * @since 12\n         */\n        AUTH_REJECTED = 3,\n        /**\n         * Internal error.\n         *\n         * @syscap SystemCapability.Communication.Bluetooth.Core\n         * @since 12\n         */\n        INTERNAL_ERROR = 4\n    }\n}\nexport default connection;\n",
}
export default FILE;